import request from '@/utils/request'

//查询车辆处置信息列表
export function handleList(params) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal/handleList`,
    method: 'get',
    params
  })
}

//获取车辆处置信息详细信息(拒绝、审批中）
export function getInfo(params) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal/getInfo`,
    method: 'get',
    params:params
  })
}

//上传合同
export function uploadContract(data) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal/uploadContract`,
    method: 'put',
    data
  })
}

//提交处置结果
export function vehicleDisposal(data) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal`,
    method: 'put',
    data
  })
}

//调用供应商模块获取承销商列表
export function getSupplierList(params) {
  return request({
    url: `/vehicleDisposal/underwriterDefault/getSupplierList`,
    method: 'get',
    params
  })
}

//根据承销商Id获取承销商账户列表
export function queryBySupplierId(params) {
  return request({
    url: `/vehicleDisposal/underwriterDefault/queryBySupplierId`,
    method: 'get',
    params
  })
}

//新增承销商违约信息
export function underwriterDefault(data) {
  return request({
    url: `/vehicleDisposal/underwriterDefault`,
    method: 'post',
    data
  })
}

//提交手续
export function submitProcedures(data) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal/submitProcedures`,
    method: 'PUT',
    data
  })
}

//提交付款凭证
export function submitPaymentVoucher(data) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal/submitPaymentVoucher`,
    method: 'PUT',
    data
  })
}

//新增车辆处置残值记录
export function residualValueLog(data) {
  return request({
    url: `/vehicleDisposal/residualValueLog`,
    method: 'post',
    data
  })
}


//获取车辆处置结果详细
export function getDisposalResult(id) {
  return request({
    url: `/vehicleDisposal/vehicleDisposal/getDisposalResult/${id}`,
    method: 'get',
  })
}


//获取车辆处置残值记录详细信息
export function getResidualValueLog(id) {
  return request({
    url: `/vehicleDisposal/residualValueLog/${id}`,
    method: 'get',
  })
}

//新增应收单发票
export function financeProceedsInvoice(data) {
  return request({
    url: `/finance/settleInvoice/addVo`,
    method: 'post',
    data
  })
}

//获取应收单发票详细信息
export function getFinanceProceedsInvoice(settleId) {
  return request({
    url: `/finance/settleInvoice/detail/${settleId}`,
    method: 'GET',
  })
}


//上传承销商违约凭证
export function postPaymentVoucher(data) {
  return request({
    url: `/vehicleDisposal/underwriterDefault/paymentVoucher`,
    method: 'post',
    data
  })
}


//查询处置开票状态
export function isDisposeVehicleBilling(params) {
  return request({
    url: `/finance/financeProceeds/isDisposeVehicleBilling`,
    method: 'get',
    params
  })
}
